]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Always assume GLSL is supported
authorJonas Ådahl <jadahl@gmail.com>
Tue, 21 Sep 2021 14:35:32 +0000 (16:35 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Tue, 21 Sep 2021 14:37:01 +0000 (16:37 +0200)
The support for GLSL has been advertised as unconditionally supported by
mutter for a while, and has now lost the 'GLSL' feature completely. Lets
remove the checks.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1985>

js/ui/lightbox.js
src/shell-glsl-effect.c
src/shell-invert-lightness-effect.c
src/st/st-scroll-view-fade.c

index 8348abada0a12020b061a93b0379f6404de6ec85..cf68ea828c4be2c4dfc9e6a042c269bc8d1e16d9 100644 (file)
@@ -129,7 +129,7 @@ var Lightbox = GObject.registerClass({
         this._container = container;
         this._children = container.get_children();
         this._fadeFactor = params.fadeFactor;
-        this._radialEffect = Clutter.feature_available(Clutter.FeatureFlags.SHADERS_GLSL) && params.radialEffect;
+        this._radialEffect = params.radialEffect;
 
         if (this._radialEffect)
             this.add_effect(new RadialShaderEffect({ name: 'radial' }));
index b7d39bd7b4cd18ab8f7585c4578ba2395e561afb..ee6f5eefe2f8230e3e4b489f1aeca3255bb23285 100644 (file)
@@ -22,29 +22,6 @@ struct _ShellGLSLEffectPrivate
 
 G_DEFINE_TYPE_WITH_PRIVATE (ShellGLSLEffect, shell_glsl_effect, CLUTTER_TYPE_OFFSCREEN_EFFECT);
 
-static gboolean
-shell_glsl_effect_pre_paint (ClutterEffect       *effect,
-                             ClutterPaintNode    *node,
-                             ClutterPaintContext *paint_context)
-{
-  ClutterEffectClass *parent_class;
-
-  if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
-    {
-      /* if we don't have support for GLSL shaders then we
-       * forcibly disable the ActorMeta
-       */
-      g_warning ("Unable to use the ShaderEffect: the graphics hardware "
-                 "or the current GL driver does not implement support "
-                 "for the GLSL shading language.");
-      clutter_actor_meta_set_enabled (CLUTTER_ACTOR_META (effect), FALSE);
-      return FALSE;
-    }
-
-  parent_class = CLUTTER_EFFECT_CLASS (shell_glsl_effect_parent_class);
-  return parent_class->pre_paint (effect, node, paint_context);
-}
-
 static CoglPipeline *
 shell_glsl_effect_create_pipeline (ClutterOffscreenEffect *effect,
                                    CoglTexture            *texture)
@@ -156,15 +133,12 @@ shell_glsl_effect_constructed (GObject *object)
 static void
 shell_glsl_effect_class_init (ShellGLSLEffectClass *klass)
 {
-  ClutterEffectClass *effect_class = CLUTTER_EFFECT_CLASS (klass);
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
   ClutterOffscreenEffectClass *offscreen_class;
 
   offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
   offscreen_class->create_pipeline = shell_glsl_effect_create_pipeline;
 
-  effect_class->pre_paint = shell_glsl_effect_pre_paint;
-
   gobject_class->constructed = shell_glsl_effect_constructed;
   gobject_class->dispose = shell_glsl_effect_dispose;
 }
index c9521ea495bb5a3da1b9993b887d484ebdd0fc81..f856ede6121015a903dbf062bcc500de435a470d 100644 (file)
@@ -72,32 +72,6 @@ G_DEFINE_TYPE (ShellInvertLightnessEffect,
                shell_invert_lightness_effect,
                CLUTTER_TYPE_OFFSCREEN_EFFECT);
 
-static gboolean
-shell_invert_lightness_effect_pre_paint (ClutterEffect       *effect,
-                                         ClutterPaintNode    *node,
-                                         ClutterPaintContext *paint_context)
-{
-  ShellInvertLightnessEffect *self = SHELL_INVERT_LIGHTNESS_EFFECT (effect);
-  ClutterEffectClass *parent_class;
-
-  if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
-    {
-      /* if we don't have support for GLSL shaders then we
-       * forcibly disable the ActorMeta
-       */
-      g_warning ("Unable to use the ShellInvertLightnessEffect: the "
-                 "graphics hardware or the current GL driver does not "
-                 "implement support for the GLSL shading language.");
-      clutter_actor_meta_set_enabled (CLUTTER_ACTOR_META (self), FALSE);
-      return FALSE;
-    }
-
-  parent_class =
-    CLUTTER_EFFECT_CLASS (shell_invert_lightness_effect_parent_class);
-
-  return parent_class->pre_paint (effect, node, paint_context);
-}
-
 static CoglPipeline *
 shell_glsl_effect_create_pipeline (ClutterOffscreenEffect *effect,
                                    CoglTexture            *texture)
@@ -126,15 +100,12 @@ shell_invert_lightness_effect_dispose (GObject *gobject)
 static void
 shell_invert_lightness_effect_class_init (ShellInvertLightnessEffectClass *klass)
 {
-  ClutterEffectClass *effect_class = CLUTTER_EFFECT_CLASS (klass);
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
   ClutterOffscreenEffectClass *offscreen_class;
 
   offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
   offscreen_class->create_pipeline = shell_glsl_effect_create_pipeline;
 
-  effect_class->pre_paint = shell_invert_lightness_effect_pre_paint;
-
   gobject_class->dispose = shell_invert_lightness_effect_dispose;
 }
 
index 6c0176f5d9bac23031201bb9e8af8195d8cc2de2..7dba2df42e19ede002f17cfad570ccfae90be35d 100644 (file)
@@ -214,15 +214,6 @@ st_scroll_view_fade_set_actor (ClutterActorMeta *meta,
 
   g_return_if_fail (actor == NULL || ST_IS_SCROLL_VIEW (actor));
 
-  if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
-    {
-      /* if we don't have support for GLSL shaders then we
-       * forcibly disable the ActorMeta
-       */
-      clutter_actor_meta_set_enabled (meta, FALSE);
-      return;
-    }
-
   if (self->vadjustment)
     {
       g_signal_handlers_disconnect_by_func (self->vadjustment,